Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-2404][VEN-2405][VEN-2406]: VAI bridge for Src and Dest #22

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

GitGuru7
Copy link
Collaborator

@GitGuru7 GitGuru7 commented Feb 19, 2024

Description

This PR aims to implement a bridge between BSC chain and non BSC chains.

Contracts

MintableTokenBridge : VAI Bridge contract for BSC chain and destination chains (This contract can be used for any assets which can be mint and burn).

TokenBridgeAdmin : Admin of the VAI Bridge contract on BSC and destination chains.

MultichainTokenController : Similar to TokenController but at this time no regulations on burning amount, can be burned more than by actual minted by a address.

MultichainToken : Generic customized ERC20 token extended by MultichainTokenController

TokenBridgeController : Intermediary contract between bridge and VAI on BNB chain; serves exact purpose of MultichainTokenController but in source chain where VAI is not upgradeable.

Resolves VEN-2404, VEN-2405, VEN-2406

Checklist

  • I have updated the documentation to account for the changes in the code.
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a test preventing this bug from silently reappearing again.
  • My contribution follows Venus contribution guidelines.

@GitGuru7 GitGuru7 self-assigned this Feb 19, 2024
@GitGuru7 GitGuru7 changed the title [VEN-2404]: VAI bridge for Src and Dest [VEN-2404][VEN-2405][VEN-2406]: VAI bridge for Src and Dest Feb 19, 2024
@GitGuru7 GitGuru7 marked this pull request as draft February 19, 2024 13:58
@GitGuru7 GitGuru7 marked this pull request as ready for review February 23, 2024 07:37
@web3rover
Copy link
Contributor

Can we use custom errors in all the contracts instead of error strings.

@GitGuru7
Copy link
Collaborator Author

Can we use custom errors in all the contracts instead of error strings.

Any failed attemp of bridge transaction on receiving end stores the failed message and emits the log with the reason string in hex format, It's easy to decode and check the failed reason in case of error strings.

Copy link

Code Coverage

Package Line Rate Branch Rate Health
Bridge 97% 87%
Bridge.XVSTokenBridge 94% 85%
Bridge.XVSTokenBridge.interfaces 100% 100%
Token 91% 73%
Token.utils 98% 86%
interfaces 100% 100%
Summary 96% (448 / 468) 85% (220 / 260)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants